Next | Prev | Up | Top | Contents | Index

The Paletted Texture Extension

The paletted texture extension, EXT_paletted_texture, lets you define a palette to look up texels before filtering; in effect, you pre-filter a texture color table. The extension defines new texture formats and new functions to support the use of paletted textures in OpenGL. The extension provides these features:

To define a paletted texture, you provide both a palette of colors and a set of image data that is composed of indices into the palette. Because the paletted texture requires both pieces of information, it increases the work required to define a texture. This is offset by the fact that you can reduce the overall amount of texture data dramatically by factoring redundant information out of the logical view of the texture and placing it in the palette.

Figure 3-3 : Paletted Texture Environment

Paletted textures provide several advantages over full-color textures:

Using the Paletted Texture Extension

To work with paletted textures, call glTexImage*() with one of the following tokens as the internalformat parameter:

COLOR_INDEX1_EXT
COLOR_INDEX2_EXT
COLOR_INDEX4_EXT
COLOR_INDEX8_EXT
COLOR_INDEX12_EXT
COLOR_INDEX16_EXT

You must also define the palette by calling glColorTableEXT().


Using the Paletted Texture Extension

Next | Prev | Up | Top | Contents | Index